<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Medicine Stock Management</title>

	<?php echo css_asset('bootstrap.css'); ?>
	<?php echo css_asset('bootstrap-theme.css'); ?>
	
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

</head>

<body>
	<?php echo js_asset('bootstrap.min.js'); ?>
	<?php echo js_asset('jquery.validate.js'); ?>
	<?php echo js_asset('validate.input.story.js'); ?>

	<div id="header">
		<div class="half left">
			<div id="lside">
				<ul class="nav nav-pills nav-stacked">
					<li><a href="<?php echo base_url();?>pro_ctrl">
					<b><font color="c9c9c9"><span class="glyphicon glyphicon-user"></span>&nbsp;
					<?php $session_data = $this->session->userdata('logged_in');?>
					<?php echo $session_data['username']; ?></font>
					<span class="navbar-right"><font color="#1ce335">Online&nbsp;
					<span class="glyphicon glyphicon-map-marker"></span></font></span></b></a></li>
					<li class="divider"></li>
				</ul>
			</div>
		</div>

		<div class="half right">
			<nav class="navbar navbar-inverse" role="navigation">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse"
						data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="navbar-brand">Medicine Stock Management</a>
				</div>

				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse"
					id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">

					</ul>
					<!-- <form class="navbar-form navbar-left" role="search">
						<div class="form-group">
							<input type="text" class="form-control" placeholder="Search">
						</div>
						<button type="submit" class="btn btn-default">Submit</button>
					</form> -->
					<ul class="nav navbar-nav navbar-right">
						<li class="dropdown"><a href="#" class="dropdown-toggle glyphicon glyphicon-list"
							data-toggle="dropdown"> <b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="<?php echo base_url();?>inv_ctrl">Admin Site</a></li>
								<li><a href="<?php echo base_url();?>sale_ctrl">Sale Page</a></li>
								<li class="divider"></li>
								<li><a href="<?php echo base_url();?>login_control/logout">Logout</a></li>
							</ul></li>
					</ul>
				</div>
				<!-- /.navbar-collapse -->
			</nav>
		</div>
	</div>

	<div id="under_header">
		<div class="half left">
			<div id="lside">
				<div class="list-group" align="center">
					<a class="list-group-item active"><b> Profile </b></a>
				</div>
			</div>
		</div>
		<div class="half right">
			<ol class="breadcrumb">
				<li>&nbsp;</li>
				<li>&nbsp;</li>
			</ol>
		</div>
	</div>

	<div id="content">
		<div class="half left">
			<div id="lside">
				<ul class="nav nav-pills nav-stacked">
					<li class="divider"></li>
					<li><a href="<?php echo base_url();?>inv_ctrl"><span
							class="glyphicon glyphicon-home">&nbsp;&nbsp;</span><b>Admin Site</b></a></li>
					<li><a href="<?php echo base_url();?>sale_ctrl"><span
							class="glyphicon glyphicon-stats">&nbsp;&nbsp;</span><b>Sale Page</b></a></li>
				</ul>
			</div>
		</div>

		<div class="half right">

			<feldset>

			<div class="panel panel-primary">
				<div class="panel-heading">
					<h3 class="panel-title">Profile</h3>
				</div>
				
				<div class="panel panel-info"> <!-- Default panel contents -->
					<div class="panel-heading"><span class="glyphicon glyphicon-info-sign"></span> Info
					<span class="panel-right">
						<button type="button" class="btn btn-primary btn-xs"
							type="submit" data-toggle="modal" data-target="#myModal">Edit Proflie</button>
					</span>
					</div>
				
				<div class="panel-body" >
				
					<ul class="list-group">
					  <li class="list-group-item"><span class="badge glyphicon glyphicon-ok">&nbsp;</span><b>Username :&nbsp;&nbsp;</b>
					  <?php echo $user['username'];?></li>
					  <li class="list-group-item"><span class="badge glyphicon glyphicon-ok">&nbsp;</span><b>Password :&nbsp;&nbsp;&nbsp;</b>
					  ********</li>
					  <li class="list-group-item"><span class="badge glyphicon glyphicon-ok">&nbsp;</span><b>Firstname :&nbsp;&nbsp;</b>
					  <?php echo $user['name'];?>
					  <li class="list-group-item"><span class="badge glyphicon glyphicon-ok">&nbsp;</span><b>Lastname :&nbsp;&nbsp;</b>
					  <?php echo $user['lastname'];?>
					  <li class="list-group-item"><span class="badge glyphicon glyphicon-ok">&nbsp;</span><b>Status :&nbsp;&nbsp;&nbsp;&nbsp;						&nbsp;&nbsp;&nbsp;&nbsp;</b><?php echo $user['user_type'];?>
					</ul>

					<!-- Modal -->
					<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
						<div class="modal-dialog">
							
						<form name="form_validate" id="form_validate" class="validateaddpeople" 
						action="<?php echo base_url();?>pro_ctrl/update_profile/<?php echo $session_data["usertype_id"]; ?>" method="post">
							
							<div class="modal-content">
								<div class="modal-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
									<h4 class="modal-title" id="myModalLabel">Edit Profile</h4>
								</div>
							<div class="modal-body">
									
								<?php $session_data = $this->session->userdata('logged_in');?>
											
									<table width="70%">
										<tr>
											<td align="right"><h5><label>Username :&nbsp;&nbsp;</label></h5></td>
											<td align="center"><input type="text" class="form-control" id="username" name="username" 
											value="<?php echo $user['username'];?>" maxlength="16" readonly="true"></td>
											<td align="center">&nbsp;</td>
										</tr>
										<tr>
											<td align="right"><h5><label>Password :&nbsp;&nbsp;</label></h5></td>
											<td align="center"><input type="password" name="password" id="password" 
											class="form-control" placeholder="Enter password" hidden="<?php echo $user['password'];?>" 
											required="true" maxlength="16"></td>
											<td align="center">&nbsp;</td>
										</tr>
										<tr>
											<td align="right"><h5><label>Confrim Password :&nbsp;&nbsp;</label></h5></td>
											<td align="center"><input type="password" name="password2" id="password2" 
											class="form-control" placeholder="Confirm password" maxlength="16" matches="password"></td>
											<td align="center">&nbsp;</td>
										</tr>
										<tr>
											<td align="right"><h5><label>Name :&nbsp;&nbsp;</label></h5></td>
											<td align="center"><input type="text" class="form-control" name="name" id="name"
											value="<?php echo $user['name'];?>"</td>
											<td align="center">&nbsp;</td>
										</tr>
										<tr>
											<td align="right"><h5><label>Lastname :&nbsp;&nbsp;</label></h5></td>
											<td align=" "><input type="text" class="form-control" name="lastname" id="lastname"
											value="<?php echo $user['lastname'];?>"></td>
											<td align="center">&nbsp;</td>
										</tr>
										<tr>
										<input type="hidden" name="hide_type" value="<?php echo $user['usertype_id'];?>">
											<td align="right"><h5><label>Status :&nbsp;&nbsp;</label></h5></td>
											<td align="center"><input type="text" class="form-control" id="user_type" name="user_type"
											
											placeholder="<?php echo $user['user_type'];?>" readonly="true"></td>
											<td align="center">&nbsp;</td>
										</tr>
									</table>
									</div>
									<div class="modal-footer">
										<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
										<button type="reset" class="btn btn-default">Reset</button>
										<button type="submit" class="btn btn-primary">Save changes</button>
									</div>
								</div><!-- /.modal-content -->
								</form>
							</div><!-- /.modal-dialog -->
						</div><!-- /.modal -->
						
					</div>
				</div>
			</div>
		
		</div>

		<div class="footer">
		
			<nav class="navbar navbar-default navbar-fixed-bottom" role="navigation">
				<ul class="nav nav-tabs">
					<li>&nbsp;</li>
				</ul>
			</nav>
			
		</div>
		</feldset>
		<br />

</body>

</html>